import { Component, Prop, Vue } from 'vue-property-decorator'
import ChartComponent from '../chart/chart'

@Component({
  template: require('./trade-info.html'),
  components: {
    ChartComponent
  }
})
export default class TradeInfoComponent extends Vue {
  @Prop({
    default: 'Default Value'
  })
  message: string

  formLabelWidth: string = '120px'

  dialogAddItemVisible: boolean = false

  form: any = {
    type: 'month',
    list: []
  }

  onAddSubject () {
    this.form.list.push({
      code: '',
      value: ''
    })
  }

  onAddItem () {
    console.log(this.form.data);
    this.form.list = [];
    this.dialogAddItemVisible = false
  }
}
